﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;

namespace ProjBackEnd.Lib
{
    public class GlobalSettings
    {
        /// <summary>
        /// 分页结果集每页最大记录数
        /// </summary>
        public const int MAXPAGESIZE = 200;
        /// <summary>
        /// 单次最大上传图片数。建议不超过9张
        /// </summary>
        public static int MAXUPLOADPICCOUNT = Convert.ToInt32(ConfigurationManager.AppSettings["MaxUploadPicCount"]);

        /// <summary>
        /// 文件归档根目录
        /// </summary>
        public static string FILEARCHIVEROOTPATH = ConfigurationManager.AppSettings["FileArchiveRootPath"];

        #region 全局通用模型操作标识符
        public const string ENTITYOPERATION_INSERT = "I"; //新增
        public const string ENTITYOPERATION_DELETE = "D"; //删除
        public const string ENTITYOPERATION_UPDATE = "U"; //修改
        public const string ENTITYOPERATION_NONE = "X"; //无
        #endregion

        #region 费用受理类别
        public const string FEELB_RECEIVE = "R"; //收费标志
        public const string FEELB_PAY = "P"; //付费标志
        #endregion

        #region 处理标志
        public const string YESLB = "Y"; //处理标志-YES
        public const string NOLB = "N"; //处理标志-NO
        public const string DENYLB = "D"; //处理标志-DENY
        #endregion

        #region 审批类别
        public const string APPLYTP_BILL = "BILL"; //审批类别-业务账单
        public const string APPLYTP_FN = "FN"; //审批类别-财务付费联系单
        #endregion

        #region 结算单类别
        public const string FNTP_BIZ = "BIZ"; //结算单类别-业务类
        public const string FNTP_ADM = "ADM"; //结算单类别-日常运营类
        #endregion

        #region 发票类别
        public const string INVO_BUYER = "B"; //我方为购方的发票
        public const string INVO_SELLER = "S"; //我方为销方的发票
        #endregion

        #region 权限管理类别
        public const string PURTP_PROJ = "PROJ"; //项目权限管理员
        public const string PURTP_ARC = "ARC"; //归档管理员
        public const string PURTP_APVSENS = "APVSENS"; //审批敏感操作
        #endregion

        #region 业务逻辑通用文案
        public const string BIZMSG_OPTSUCC = "操作成功";
        public const string BIZMSG_NONEINFO = "未找到信息";
        public const string BIZMSG_HASCHILD = "有子记录，无法删除";
        public const string BIZMSG_ZEROPAGE = "每页显示条数不能为0";
        public const string BIZMSG_INFOEXSITED = "信息已存在";
        public const string BIZMSG_REFERROR = "获取流水号失败";
        public const string BIZMSG_OPTLBERR = "操作标识符异常";
        public const string BIZMSG_AREAERR = "区域代码异常";
        public const string BIZMSG_DATASOURERR = "数据源异常。";
        public const string BIZMSG_ANALYSISERR = "报文解析异常。";
        #endregion

        #region 接口通用文案
        public const string MSG_BADREQUEST = "非法请求。";
        public const string MSG_FORMATERROR = "请求数据格式错误。";
        public const string MSG_INVALIDTOKEN = "用户令牌无效。";
        public const string MSG_DATAEXCEPTION = "数据访问异常。";
        public const string MSG_NETERROR = "网络请求失败。";
        #endregion

        #region 全局通用分隔符
        public const char SP_KEY = '|'; //请求参数KEY
        public const string SP_PATH = "\\"; //物理路径
        public const string SP_LOG = ";"; //日志文案
        public const string SP_LOG_PARAM = "@"; //日志业务参数
        #endregion

        #region 微信接口URL
        public const string URL_WX_ACCESSTOKEN = "https://api.weixin.qq.com/cgi-bin/token"; //获取AccessToken
        public const string URL_WX_CODE2SESSION = "https://api.weixin.qq.com/sns/jscode2session"; //获取用户openid及unionid
        public const string URL_WX_GETUSERINFO = "https://api.weixin.qq.com/cgi-bin/user/info"; //获取公众号用户详细信息
        public const string URL_WX_SENDTEMPLATEMSG = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="; //推送模板消息
        #endregion

        #region 微信模板消息id
        public const string WX_TEMPLATEID_APPLYREQ = "wDZUj3hEvgI-uPuUQpeYWSUyE8sanMg1W4cyP0HFirg";
        public const string WX_TEMPLATEID_APPLYRESULT = "JCfHmfTRkdd_h6PSlPXxSnyGEOthtGwgDaLs6ll8oYo";
        #endregion

        #region 外部平台归属
        public const string EXTPUBOWNER_WX = "wx"; //微信平台
        #endregion

        #region 默认微信小程序Appid
        public const string WXMINIAPPID = "wx3c2fb3f74051d737";
        #endregion

    }
}